﻿@using Adf.FrameWork.Service.LayUi
@using CYQ.Data.Table
@{
    MDataRow drUser = ViewBag.drUser ?? new MDataRow();

}



<html>
<head>
    <meta charset="utf-8">
    <script src="/Style/js/jquery-3.4.1.min.js"></script>

    <script src="~/upload/ueditor/ueditor.all.min.js"></script>
    <script src="~/upload/ueditor/ueditor.config.js"></script>

    <link href="~/Style/layui/css/layui.css" rel="stylesheet" />

</head>

<body class="layui-layout-body">
    <!--主体 start-->

    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">

                    <fieldset class="layui-elem-field site-demo-button" style="margin-top: 30px;">
                        <legend>
                            @drUser.Get("username", "")-个人信息 - <button class="save layui-btn-danger layui-btn-xs layui-btn" lay-filter="btnSubmit" lay-submit="">保存</button>
                    </legend>
                    <br>
                    <div class="layui-card-body">

                        <div class="layui-form" lay-filter="">

                            <div class="layui-form-item">

                                <div class=" layui-col-xs12 layui-col-md3">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">用户编码</label>
                                        <div class="layui-input-inline">
                                            <input class="layui-input" id="usercode" name="usercode" readonly="readonly" type="text" value="@drUser.Get("usercode", "")">
                                        </div>
                                    </div>
                                </div>
                                <div class=" layui-col-xs12 layui-col-md3">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">用户名称</label>
                                        <div class="layui-input-inline">
                                            <input class="layui-input" id="username" name="username" readonly="readonly" type="text" value="@drUser.Get("username", "")">
                                        </div>
                                    </div>
                                </div>

                                <div class=" layui-col-xs12 layui-col-md3">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">所属机构</label>
                                        <div class="layui-input-inline">
                                            <input class="layui-input" id="orgname" name="orgname" readonly="readonly" type="text" value="@drUser.Get("orgcode", "")">
                                        </div>
                                    </div>
                                </div>
                                <div class=" layui-col-xs12 layui-col-md3">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">所属角色</label>
                                        <div class="layui-input-inline">
                                            <input class="layui-input" readonly="readonly" type="text" value="@drUser.Get("usercode", "")">
                                        </div>
                                    </div>
                                </div>

                                <div class=" layui-col-xs12 layui-col-md3">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">手机</label>
                                        <div class="layui-input-inline">
                                            <input class="layui-input" id="cellphone" name="cellphone" type="text" value="@drUser.Get("cellphone", "")">
                                        </div>
                                    </div>
                                </div>
                                <div class=" layui-col-xs12 layui-col-md3">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">身份证</label>
                                        <div class="layui-input-inline">
                                            <input class="layui-input" id="idcard" name="idcard" type="text" value="@drUser.Get("idcard", "")">
                                        </div>
                                    </div>
                                </div>
                                <div class=" layui-col-xs12 layui-col-md3">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">地址</label>
                                        <div class="layui-input-inline">
                                            <input class="layui-input" id="address" name="address" type="text" value="@drUser.Get("address", "")">
                                        </div>
                                    </div>
                                </div>
                                <div class=" layui-col-xs12 layui-col-md3">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">Email</label>
                                        <div class="layui-input-inline">
                                            <input class="layui-input" id="email" name="email" type="text" value="@drUser.Get("email", "")">
                                        </div>
                                    </div>
                                </div>

                                <div class=" layui-col-xs12 layui-col-md12">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">备注</label>
                                        <div class="layui-input-block">
                                            <input class="layui-input" id="userremark" name="userremark"   style=" width: 1581px; height: 50px;" type="text" value="@drUser.Get("userremark", "")">

                                        </div>
                                    </div>
                                </div>


                                @*<div class=" layui-col-xs12 layui-col-md12">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">头像</label>
                                            <div class="layui-input-inline">
                                                <div class="layui-upload-drag" id="test10">
                                                    <i class="layui-icon"></i>
                                                    <p>点击上传，或将文件拖拽到此处</p>
                                                    <div class="layui-hide" id="uploadDemoView">
                                                        <hr>
                                                        <img src="" alt="上传成功后渲染" style="max-width: 196px">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>*@


                            </div>

                        </div>
                    </div>
                </fieldset>
            </div>
        </div>
    </div>
</div>




<!--主体 End-->
<!--底部 开始-->
<script src="~/Style/layui/layui.js"></script>

<script src="~/Style/layui/adfCommon.js"></script>
<script>
    layui.config({
        base: '/style/v2/layuiadmin/lib/' //静态资源所在路径
    }).use(['layer', 'form', 'upload'], function () {
        var layer = layui.layer,
            form = layui.form,
            upload = layui.upload,
            adfCommon = layui.adfCommon;


        var sUrl = "/user/execute";


        $(".save").click(function () {
            $.ajax({
                url: sUrl,

                data: {
                    doCmd: "modify",
                    usercode: $("#usercode").val(),
                    password: $("#password").val(),
                    cellphone: $("#cellphone").val(),
                    idcard: $("#idcard").val(),
                    address: $("#address").val(),
                    email: $("#email").val(),
                    userremark: $("#userremark").val()
                },

                type: "POST",
                success: function (retData) {
                    if (retData.RetStatus == 101) {
                        alert('修改成功');
                        layer.msg('修改成功');
                        var indexUrl = "/home/index?usercode=" + $("#usercode").val();
                        window.location.href = indexUrl;
                    } else if (retData.RetStatus != 101) {
                        layer.msg('修改失败');
                    }
                }
            });
        });

    });
</script>


<!--底部 结束-->

</body>
</html>
